AI Pick Lists
=============

The AI buys its forces according to a preset list of formations. The list varies due to mission (assault etc) and available air strikes, points and so forth.

These formations MUST EXIST at the time of purchase - or no item will be bought.

If you alter the formations with Mobhack - move to a new slot or alter dates etc - then you MUST rewrite the AI pick list for the nationality in question or you may recieve strange force structures when playing aginst that force under computer control.

The following must NEVER be given to the AI for use
- level bombers (no code for this - can only be used in scenarios pre-plotted by human designer)
- parachute planes and paras to drop (ditto)
- gliders (ditto)
- Ammo trucks (bunkers may be used in a defensive scenario with human placement, otherwise the AI has no knowledge of ammo trucks)

AI pick list structure
======================

In MBT, the AI pick lists have ben removed from the hard coded versions used in WW2 and replaced by a data driven pick list structure. (WW2 has too many WW2 time and location etc. specific items to allow a generic pick structure like this - consequently WW2 formations cannot be moved, or dates altered - this only applies to the provided formations of course - in WW2 you can add new formations, the AI will simply ignore these).

In MBT the same applies - new formations which do not overwrite the supplied formations are fine, they will only be available to the human player. 

in MBT - there is a default pick list, for any nation not supplied with data files, but it is not recommended. See end of file for default formation ID numbers.

-----
SPECIAL NOTE !!!

- the dat files are TEXT files, use a TEXT editor like notepad when editing manually. Do NOT use a word processir!!!!
- there is NO error checking in the code - you must ensure that required files exist, and are 100% formatted correctly etc.
- There is NO user friendly editor!

- Each nation's pick list data is held in the supplied EXCEL SPREADSHEET - if you do not have EXCEL, you will require access to a spreadsheet whic can read XLS format files.

- the AI pick DAT files live in the data\misc sub-folder of the game. before doing any work BACK THESE FILES UP in case of mistakes.

- To move data from the spreadsheet to DAT files
   - Select the appropriate column of data in the spreadsheet (do NOT copy the titles which are cosmetic!!)
   - copy to clipboard
   - open the appropriate DAT file in your text editor (create a new one with the right name, if making your own extensions)
   - select all in the text editor
   - paste, to overwrite all
   - save text file

----

1) Opponent file
file name format  - PK2NNN00.DAT

NNN - nation number preceded by leading zeroes, e.g. USSR is Pk201100.dat

the pick code looks through this when the nation is fighting and locates the ID number of its opponent. This "magic number" is used to branch to the appropriate Main Control File ( MCF - see following) which determines the force structure for that opponent nation. Thus, we can have forces with a different pick list for specific dates and/or opponent parings - se the UK for one which has separate light lists for say the Falklands V Argentina. 

0 is the default number. A nation with no special cases thus will have all 0's in this file.

----

2) Main Control File

There will be 1 (or more) of these - 1 if the opponent file is all 0's, more if there are different pick lists by opponent ID.

file name format - PKNNNXXX.dat

NNN - nation number preceded by leading zeroes, 
XXX = the magic number read from the Opponent File above, preceded by leading 0's

e.g. Syria default MCF is PK001000

The MCF file is a set of records of the format:
start month (1..12)
start year (46..120)
end month (1..12)
end year (1..12)
Pick list ID number (0 to 9999) pointer

1) ENSURE that there are NO gaps in dates OR overlaps - or the game code may hang in such circumstances !
2) ENSURE that the pick list pointer references an existing pick list file
3) ENSURE you have an MCF for EVERY "magic number" in the Opponent file. 

The code runs through until it finds a data record which matches the battle date. It then opens the appropriate pick list file and the pick code processes that to create the AI force.

NOTE - the pointer ID numbers do not need to be in any particular sequence. it is a good idea to number in a gap series (like BASIC line numbers of yore) so that if an insertion is required, it can be easily done without renumbering and rewriting all the subsequent DAT files. A series of 0,2,4,6 etc is recommended.

----

3) Pick list Data file

1 or more of these, for each MCF in the data.

file name format PNNNXXXX.dat

NNN - as usual, the nation ID number preceded by leading zeros
XXXX - the ID number of this pick list - the pointer held in the MCF

Notes 
- points, where mentioned below is REMAINING buy points and NOT the initial toatal - remainder will of course decrement as purchases occur.

- The points for a particular formation for a particular date should reflect the true value otherwise expensive units may soak up all the points. For example if you put say 400 points in as the value for a tank platoon from 1946 to 2020 - by 2020 your individual MBT may cost more than that! so in later periods this value needs to be approximately the price of the most expensive tanks available. (Some OOB are split into MBT comapnies later on to aid AI buy as these can be seriously more expensive than the remaining medium tanks).

If an item is compulsory then the formation ID MUST be non-0. Otherwise, unused lines will be 0.

The lines are as follows:

INFANTRY
--------

1) min no of rifle companies - use 1 or 2, maybe 3 for large leg infantry counts. Generally, determines how many infantry companies are bought before other items.
2) Leg Rifle Co 1 ID (MANDATORY) - the formation ID number of a leg rifle company. Used in defence, beach assault, city fighting etc. 

This is the "bread and butter" infantry company bought all over, and must be a line rifle company. Use the light forces variable section below for a sprinkling of workers militia or conscript type stuff if you want. as otherwise you can have far too many workers militia etc popping up (briefly :). In other words, this company should be a reasonable combat value!.

3) Leg Rifle Co 2 ID - OPTIONAL - a more expensive or rarer alternative leg rifle company formation ID number.
4) Leg Rifle Co 2 min points - minimum numbe rof remaining buy points to consider buying this company
5) Leg Rifle Co 2 chance - if the required points exist, the chance to purchase this company instead of No 1.
6) Leg Rifle Co 3 ID - as for company 2, a third option is available
7) Leg Rifle Co 3 min points 
8) Leg Rifle Co 3 chance

NOTE - no gaps (no number 3 with no company 2!)
- assign in ascending order of points, e.g. default could be conscripts, No 1 line rifle company, No 3 maybe a guards company with hoghest points and a low %age chance of buying.

9) leg rifle plt ID (MANDATORY) - the platoon ID - use the regular line one here - used for "round out" filling in the final buy to use remaining points. Normally the platoon used by the company described by 2.

MECH NOTE - the "mech" rifle companies below should be more accurately titled "infantry coys used in the advance or assault" - a tribal army would use leg rifle coys here, an army in transition to APC may have a leg rifle co as No1 with APC co in slot 2, with say a 1500 point requirement and 50% chance for example. mech rifle and leg cos are both bought in the delay/defend as well.

A seriously tank-heavy force (say Israel in 73) - may have the mech rifle platoon as slot 1 to reduce rifle count vis a vis tanks, company as slot 2 with a high points requirement etc.


10) mech rifle co 1 ID - As for 2, but see mech note above
11) mech rifle co 2 ID - as above
12) mech rifle co 2 min points 
13) mech rifle co 2 chance
14) mech rifle co 3 ID - as above
15) mech rifle co 3 min points 
16) mech rifle co 3 chance
17) mech rifle plt ID (MANDATORY) - a round out unit used in low remaining points in advace or assault, sometimes in defence.

NB - 17, as it is the el-cheapo mech platoon is normally the less costly if you have several in the OOB - e.g. the BTR platoon and not the BMP one in the USSR OOB, but feel free to experiment. It is usually the same platoon as used by item 10.

18)fortification ID (MANDATORY) - the formation ID of the normal 3 bunkers, may be a fort complex for some armies (say VC).used only in the defence. 

19) leg eng plt ID (MANDATORY) - used only in the assault, the normal leg engineer platoon

20) eng tank plt 1 ID - engineer tank default unit - used only in the assault
21) eng tank plt 2 ID - an optional engineer tank platoon ID for the assault mission, 50% chance to replace No 20
22) max eng tank plts - the max No of such units allowed

NB - there is space to use these creatively for assault missions, as they supplement leg engineer buy and do not replace them. One of these could be a 105 CS tank platoon for example for variety. Where engineer tanks are rare or only being introduced - use a leg engineer platoon as the alternative perhaps, to increase total leg egineer count.

23) transport helo plt ID - formation ID of a unit of 3 or so helicopters
24) transport hel co ID - a mixed (buy type 5) unit with integrated helos, see below.
25) transport helo co minpts - the minimum points required to consider buying an assault helo formation - use 4 to 5000 points or so for most armies, maybe 2500 for say USMC. 
26) transport helo chance - assuming the points are OK - chance to buy an assault helo formation
27) max transport helo buy - max of such buys to make

Transport Helos note - The AI MUST have air strikes to buy these (obviously) and it needs to have a large allocation of such (5 or more air flights remaining as I recall) remaining (goes down with attack planes bought) before it actually buys these. Item 27 should not usually be greater than 20 or so or you will tend to see too many AI heliborne infantry (experiment! :). 

IF a transport helo platoon (23) is bought, the AI will use formation 24 if non-0, otherwise it will buy the default leg infantry company as well (2 above) to ensure some passengers exist. (buy of company is there because some helo platoons (chinook, Mi-8 say) can hump quite a few grunts :). 23 could therefore be a 10 slick for say a USA pick, and will lift regular troops. In that case 24 may be a more rare mixed helo formation (paras [h] or rangers [h] say). 24 can be a platoon [h] or a co [h[ as you desire - Can be a platoon or a company type formation to taste, and as reflected in item 25.

AAA UNITS
---------

More chance of buying AA units if the remaining number of air flights is low or has decremented due to air flight purchases.  AI will buy AAA even if it has aircraft allocated, as now both sides can use air simultaneously, and in campaigns human can have core helos too.

28) inf SAM or AAMG sect ID - use for infantry SAM or a small AA MG or AA gun section. Can be left at 0 for armies with no inf-SAM or which are AAA light as the following item will tend to replace it. NB - one of these will be bought up front as a "fig leaf" of AA protection for all AI forces in the initial buy, with the default mortar section and (posssibly) a tank section.

29) AAA (guns) plt ID - the default platoon/section of 2 or 3 AA guns or MG, or in later armies this can be inf-SAM if AAG are obsoleted. 

30) SP AAA section ID - for any SP anti air section of 2 or 3 guns. 0 if no such.
31) SP AAA Platoon ID - a larger group of SP AA guns - OPTIONAL if item 30 non-0 - bought instead of item 30, if larger amount of buy points remaining.

32) SP SAM Section ID - a section of 2 SP-SAM launchers if available
33) SP SAM Platoon ID - a larger SP-SAM unit, OPTIONAL if 32 exists, it will be bought as a replacement when points remaining are high.

NB - an army with only SP-SAM and no SP AAA would have its SP SAM in slot 30 instead, as 32 is a replacement for 30/31. Or it may have say inf-SAM as a replacement for the SP AAA. Experiment.

34) Area AA battery - long range SAM for those who have them, or an AAA gun battery in early period, or some other larger AA type unit if no LR SAM.




35) Inf AT section ID - a small unit of 2 or 3 inf-AT, usually RPG type weapons. (MANDATORY). If the army does not have RPG type units - use some other infantry type here.

36) Inf ATGM Section ID - IF 35 exists, this will replace it aprox 50% of the time. Used for armies which have ATGM separated from lighter RPG type inf-AT. In earlier periods this can be an inf-RCL type unit. In other words - the AI expects these units to have longer range and/or be more expensive/ or be rarer than the formation used in #35

NB - BOTH 35 and 36 must be inf-AT type units as the AI buys these in the advance so cannot be static AT gun types (The AI does not move ATG type items (gun+crew) whether or not it has a speed value). However - you may want to experiment with say #36 as AT guns, if the AI is attacking these will not advance, and will remain behind perhaps being of use against any human units trying to outflank or get to the AI's rear area. May be worth an experiment.


OFF MAP ARTY
------------

37) basic off map art chance - the chance to buy off map artillery each time round the buy loop. Generally in the 10 to 35 sort of range. 10 or so seems about right for most armies. 25 or so buys lots, 80 would result in a battery per company usually - rather too high. AI buys more arty in the assault, in any case.

38) off map light battery - the default artillery battery to buy - COMPULSORY.
39) off map light bn ID - the batallion sized version of the above, optional (some armies may be arty light!).
40) min points to buy light arty bn - the minimum remaining buy points required to consider item Nr 40

41) off map med bty ID - optional - a rarer or more expensive battery type than 38
42) batallion of 41 - optional if 41 exists 
43) min points for medium bn - points required to buy a bigger lump of #42

NB - 42 is a replacement for 39, so 39 must exist!.

44,42,43) - as for the medium battery, for heavy or extra rare arty type formation, more usual in assault than open battle. Replaces 38/9 so those must exist to use this item.

47-9) Rocket bn - replacement for 38, more common in assaults. Used for off map MRL, typically. 

50) off map tube minelet bty id - used for tube artillery launched mine unit. Use a battery sized unit, max.
51) min points to buy tube art mine bty - should be a large value - required remaining points to consider buying #50
52) off map rocket minelet bty ID - like 50, but for the rocket launched mine formation.
53) min points to buy rocket mines - remaining buy points needed to buy these.
54) basic chance for mine bty purchase - use a LOW value here or the things are too common! - 5 to 10 or so suggested.

55) off map bomblet-only bty (eg MLRS) - this slot is used for rocket arty that is split off from the normal HE MRL - or for say NATO type armies with MRLS, use this slot for a MRL battery with cluster type bomblet ammo, not HE. Use a battery size formation.
56) min points to buy AT bomblet bty - the remaining buy points to consider buying this formation
57) basic chance to buy AT bomblet bty - if points sufficient, chance to buy - could be rather high for say NATO. lower for say WARPACT, very low for any 3rd world bomblet rocket users.

55-57 could be also used to split armies with off map towed MRL (with low rocket count) and SP MRL (which tend to be higher rocket count). 55-57 tends to be bought in any battle type - 47 is more usuallly bought in the assault by the AI. Experiment.

58) ID of first naval art bty - COMPULSORY (even if you have no navy the end user is allowed to select beach assault e.g. for the Swiss <G!>). If you have no navy, then the AI will of course have no arty support, bar any air strikes it may buy. For armies with no naval guns, use a mortar or SPA platoon here for the boats to carry ashore.
59) number of continuous naval btys. Insert the number of naval batteries here - AI will randomly choose 1 from formation in 58 to this number -1. NB!! - All the naval batteries in an OOB used by the AI (ones for human can be shotgunned about) - MUST be organised in a line, e.g. formations say 54,55,56. In this case - the number inserted in 59 will be 3 as there are 3 continuous naval support batteries. if there is only 1 (or you have no navy and have used a non naval gun formation) - enter 1.


TANKS
-----

60) Tank section (for low points) nr 1. This is used to buy a tank or tank-type formation up front before the main buy loop starts, primarily for AI buys when points are low, to ensure some tanks are bought. Item 1 is the cheap one for lowest points, depending on designer choice this could be a light tank section or platoon, a jeep RCL section, or a secion of 2 tanks if not too expensive. (You do not want the AI to buy 2 500 point MBT up front if it only has say 1000 total points to spend! :). COMPULSORY. 
61) min points to buy a tank 1 section - should be 500 to 600 points or so, to allow some left over at very low points to allow a rifle platoon or 2.
62) tank section 2 ID - a more expensive item than 1, for when initial buy points are more sufficient. Typically a tank platoon, to ensure a few tanks bought up front. optional. 
63) min points remain to buy tk sect 2 - more expensive value than 61.
64) %age chance to buy 2 instead of 1 - if the points are OK, chance to replace 60 with 63.

NB - if the buy code determines that it has well over the cost of the default tank platoon (item 65) - it will often buy that up front instead of 60 or 62.

Light tanks - only use light tank formations in the normal tank buy (65 through 81) if these are common battlefield "fleet buy" MBT replacement items. Where light tanks are recce or rare support units - use the support formations and recce fromations later on for such light tank formations. (e.g - Israel used AMX-13 as battle tanks in 67, not so by 73, so an Israeli 67 pick legitamately can have AMX-13 platoons and companies in this part of the AI pick list).

[NB - tank items below - these could be more infantry in horde type armies, to pad out the infantry buy (and reduce the relative number of support weapons such as artillery) or the lower value items could be such in an army with tanks, but where they are relatively rare.] 

Also - formation cost should reflect the cost of the desired platoon/company, however for armies where tanks are relatively rare, you could raise the cost of the formation over the notional cost to reduce tank count, so they are only bought at high points availability.

NB - when AI tank heavy is on, the tank buy section tends to buy twice. Also, it only will buy platoon sized infantry items, thus increasing the tank buy. (If you have deisgned an infantry horde type army with riflemen replacing tank formations, then setting the AI tank heavy preference will tend to buy a super-infantry horde <G!>)

65) Tank platoon 1 ID - the default tank platoon ID. The common buy. if your army has no tanks, use something else for a common buy (could be a rifle platoon for guerillas). For some armies which only have seriously expensive MBT, it is a good idea to provide a section of 2 or so MBT and use that here, with the 4 tank platoon in slot 67.

66) min points required to buy tp 1 - the minimum buy points remaining to purchase item 65. 

The points value for this troop should be enough to buy the most expensive tank platoon at this period (with 60 filling in when rmaining points get low). If you have seriously expensive M1 type MBT and also say older Soviet block medium tanks, you may want to design your OBAT with the MBT as a separate class with thier own formations, and use the alternatives to buy appropriately depending on available points. If this item is set too low, the AI can exhaust its points on a few tanks rather too quickly in low-point battles, but too high can bar tank  purchase, esp if there is a wide cost variation in available tanks (M47 and M1A1 in same army at same time say). It is best to design your OOB with these tanks in different formations (mediums and MBT say) even if they use the same organisation. The human player would not have a problem here, but the AI WILL - it tries to buy the best tank available (most expensive) generally speaking so will tend to not buy the m47 where M1 are also around. Depends on other random factors, but the code is designed to prefer later date and also more expensive items where there is a selection.

The correct value to use for the tank platoon buy is therefore an item to seriously experiment with, and can be a major reason to split a pick list into more time periods simply because of the rising cost of the MBT. Remember to test auto purchasing of your list at low points as well as high. 

67) tank platoon nr 2 ID - an ALTERNATIVE to 65, so 65 has to exist first <G!>. Use for a rarer and/or more expensive tank platoon. In an army split into cheaper medium and more expensive MBT this would probably be the MBT platoon, 65 the medium tank pl. Could be heavy tanks such as T-10, or a 4 tank platooon in Soviet armies.
68) minimum remaining points to buy TP nr 2 - more expensive than 66, obviously as these are rarer or more expensive or both. 
69) %age chance to buy TP Nr 2 - if the remaining points are sufficient, then the chance to buy this item. if 65 is a cheap light tank unit or tank section of 2 used for "round out" buying when points are low, use a high value here.
70) tank platoon 3 ID - an alt to 67. An even rarer or more expensive item than 67.
71) min points remain to buy a TP 3 - an even larger value than 68
72) %age chance of buying TP nr 3

Tank companies are optional. Tank company replaces tank platoon at higher remaining buy points, so 65 must exist at a minimum to use. 3 alternatives, as per platoons. Again - infantry based armies could be creative here. For example - using better class rifle coys instead of or as well as tanks coys, and perhaps only buying tank platoons instead of coys - using the points minimums and percentages to regulate this.

73) tank company nr 1 ID - the default or cheapest tank company 
74) min remaining points to buy a T co 1 - the minimum remaining buy points to consider buying Nr 72 to replace whatever tank  platoon was selected.
75) chance of buying a tank co 1 if points adequate - for tank light armies, a low value of say 20-30, for tank heavy picks, use say 70-90. 
76..81 - alternate and increasingly more expensive/rarer tnk coys to replace #73 if bought.

SP-TD
-----

82) SP TD (gun or ATGM) small unit ID - a small unit of 2 or 3 SP guns, SP RCL, or SP ATGM.
(in infantry or guerilla hordes this may be used as an infantry support unit perhaps - say a pair of RPG teams). Reasonably common buy.
83) alternate SP TD section ID. Replaces 82 if chosen, as determined by 84
84) %age chance of alternate replacing td sec 1 - if 50, a 50/50 chance between 82 and 83.

85) SP TD battery ID - this is a larger lump of SP anti tank guns, or SP-ATGM. Some leg armies might have a large inf-AT or ATGM foot unit here (e.g. Egyptioan tank killer RPG/Sagger formation in 1973). Used in the advance and also (more common) in the defence. Must be mobile (not AT gun) for AI to move it, but an immobile lump of ATG can protect the AI rear area if it's attacking. Optional. Replaces 82/3, so if used then 82 must be non-0.
86) minimum points to buy  SP TD battery - the minimum number of points required to buy this item - should be a rather high value, well above the formation cost (4000 to 6000 points) to ensure rarity.
87) Chance of buying battery if points avail - if points requirement satisfied, chance of 85 replacing 82/83 item.

88) inf heavy ATGM sec (TOW etc) section ID. Use for heavy (slower) ATGM, or perhaps slower inf-RCL. Replaces inf-ATGM above, more commonly in defence. Should be mobile (no AT guns), but feel free to experiment..

BARGE CARRIERS
--------------

89) standard 2 or 3 barge carriers - MANDATORY. used in the river crossing assault, standard 2 barge carrier formation that all OBATS must have, or they cannot get vehicles over river crossings. 
90) optional large barge cariers lump (4 or 5 say) - some OBATS may have a larger barge carrier formation, this is for that as a replacement item for 89

Ther may be some tribal OOB with absolutely no vehicles whatsoever, with smim capable cavalry instead of tanks, and absolutely no Toyota pickups etc, but I cannot think of any!. You might want to make the default barge carrier a single vehicle unit in the OOB in this case.

(in any case defending against an AI river crossing is a turkey shoot, as the human tends to spot the barge carriers and splat them before the AI can even deploy. This is why only the human will see the river crossing assault as an option in campaigns and never a river defence. But you have to cover your bases as to generated battles where somebody wants to shoot AI fish trying to cross the river barrel :)


MORTARS and ON-MAP ARTY
-----------------------

NB - never give the AI any artillery units with embedded transport, such as trucks, as it does not use these and will just fill the trucks with spare infntry in the advance (includes any added to the infantry formations above). These trucks will charge forwards in the advance, or sit as stationary targets in the defence. So - best to use pure arty formations. Also, avoid any of the special formations some OOB designers provide with added ammo trucks, as the AI will just kamikaze these in the attack, and is unlikely to place the arty beside them in the defence, and will also try to re-take objectives with them in a counter-attack :)


All these items replace the basic item described in No 91. 

Item number 91 is required - all others are optional.

91) mortar section ID (MANDATORY) - standard section or platoon worth 2-4 tubes of medium mortars, MUST EXIST 

Item 91 is the cheap and cheerful minimum cost he brick thrower for your army. One of these will be bought as a minimum in all situations. It therefore should be a cheap infantry mortar section.

92) Mortar bty or plt ID - optional - replaces 91 if points are high
93) heavy mortar sect ID - small unit of ground fired large mortars (120mm say)
94) heavy mortar bty/plt ID - larger/rarer replacement for 93
95) SP Mortars section ID - small unit of SP mortars
96) SP Mortars Plt ID - larger SPM formation
97) SP heavy mortars sect ID - use where your army has light SPM (say 81mm) and heavy SPM type formations (say 107mm SPM)
98) SP heavy Mortars plt/bty ID - larger and rarer item than 97
99) Towed guns plt ID - section of 3 or 4 on map howitzers.
100) towed Guns bty ID - the battery version of 99.
101) SPA platoon ID - platoon of 3 or 3 SP howitzers
102) SPA points req to buy a plt - minimunm points remaining to allow buy of item Nr 101
103) Alternate SPA plt ID - if 101 bought and this exists, a different SPA platoon 
104) Chance of alt replacing SPA Plt 1 - chance of 103 replacing 101
105) SPA battery nr 1 ID SPA battery, replaces 101 so 101 must be not 0
106) min points required to buy an SPA bty - needs this value to buy an SPA battery
107) Alternate SPA bty ID - alt to 105
108) Chance of this replacing nr 1 - chance it will replace the default SPA bty

FOO
---

109) Foot (or only) FO team ID - the default FO spotter officer on foot or in a vehicle. optional.
110) vehicle or alt FOO ID - replaces 109 if bought, 50% of the time. 109 needs to be not-0 to buy.
111) chance of a FOO being bought. Use a low value of 5-15 for armies with poor artillery tactics, max of about 50 for armies with lots of FO spotters. The AI really only needs 1 or 2 spotters and values over 30 or so here produce far too many OP units.


AIR UNITS
---------

remember never to give the AI any level bombers as it cannot use these, unless pre-programmed by a human scenario designer. So keep those out of the pick list which is used in non-scenario situations,

All air strike formations must be 2 ship formations - SP default. Some armies where air is rare may be 1 ship formations. Large air users (e.g. the USA) already have the number of air strikes rather large in the air strike allocation, so there is nil need to assign 4 ship etc formations.

112) basic planes ID. The normal fixed wing air strike of 2 planes. 0 for armies with no fixed air force at this time frame.
113) attack helicpters section - the gunship section of 2 attack helicopters. replacement formation for 112. Could be COIN planes if desired and the army has both section types. ie - not limited to rotary-wings.
114) wild weasel (with ARM) - TBD (new type) - WW is now in the code - this item replaces 112, if lots of air sections available, for the first 1 or 2 flights bought, sometimes.
115) If planes bought, chance of replace with helo. if 112 (but not 114) chosen, and 113 is not 0, the chance that gunship section will replace fixed wing. Numbers like 50 tend to produce too many helos vs fixed wings - you may need to run experiments to find a balance that suits your OOB and date.

NB. Some armies may have no fixed wing, but do have helos - use 112 for the attack helos in this case. if only helos available, and helos rare - maybe fill 112 with a filler unit, of non-air artillery?.

NB - 114 may be useless in some picks as SAM is rare or non existant. You may perhaps use 114 for a few fixed normal strike planes on occasion with 112 being attack helos, 113 as COIN or a different helo (light attack say). Example may be USA in vietnam vs VC type list.  Feel free to experiment.

114 could also be used for a large lump of planes - 4 or so? - and in the USA v VC case, could be say a platoon of 2 light attack helos (LOACH say) and 2 COIN planes. AI would then be able to field strike planes, gunship helos, light gunship helos and COIN anti-personnel planes against a human player. The type 114 would max out at 2 flights.


MGS
---

tend to be bought in the delay or defence

116) MG or AGL section 1 ID - the default unit of 2-4 MG
117) Alternate (50%) MG or AGL section - use for an AGL unit when 116 is an MG section, or you could use a sniper here to increase sniper count in some armies which use them a lot.

LIGHT SUPPORT SECTION
---------------------

This is a set of support units with some variety - these can be light tanks, assault guns, extra AT jeep types, or infantry support  units such as inf-AT or rarer rifle platoon types in guerilla armies, or engineers (thus bought outside the assault) for the same - e.g VC assault pioneers say. 

In other words, a section of items to add some extra flavour and variety to the AI pick. 

Bought in all battle types. So must be mobile/manouvere troops - no arty ot AT guns etc. Fill from the top down, ie no gaps (0 items) in the list of 4. Fill 118 and 119, but not 118=X,119=0, 120=Y.

Use small cheap platoon type units of 2-3 items here NOT companies! - but you may want say Ugandan conscript rifle coys as 1 of the choices, if you want a few of these for spice, but do not want them "fleet bought" as the default rifle company.

118) Light tank or light support ID 1 - the initial support unit, default, not 0 if any used.
119) Light tank or light support ID 2 - possible replacement for 118.
120) Light tank or light support ID 3 - possible replacement for 119
121) Light tank or light support ID 4 (pref for foot) - possible replacement for #118

NB "foot" is an internal flag the AI sets if the points are very low, or it is a beach assult (APC are less use in the beach assault as they will be loaded into barges with crew separated even into separate landing craft, and the AI will use the unloaded APC as very light tanks) - in this case mech infantry are not bought. If this flag is set and 121 is present then it will get an extra chance of being bought - so the 4th light support should be the cheapest item, for use by a mainly infantry force. Say, an RCL jeep section or extra inf-AT or engineer platoon, or a section of 2 RPG.

122) Points needed to buy light tank plt - this has nothing to do with the cost of the most expensive item of the 4 possibles - it is used as a "screening" item, so should be rather more expensive - 1000 or 2000 points say, so these extras are only bought if there is plenty of points left. If you set this bar too low, you may get too many of these formations which are intended as "decoration" or "flavour" - but then of course, that may be exactly what YOUR OOB needs <G>.

123) Points needed to buy a light tank plt - basic chance of buying a light tank/support platoon
124) Chance of this replacing nr1 - the chance that #119 will replace #118
125) chance of this replacing nr 1 - the chance of this replacing #124
126) chance of this replacing nr 1 (is more likely if foot) - chance of this replacing 125 (gets more chance if the foot flag is set)
127) max number of lt tank plts bought - used to limit the maximum number of these light support formations bought. Put in a silly number like 300 if you want lots of support groups, along with low screening value perhaps.

RECCE UNITS
-----------

Recce units are used in the advance or assault.  Usually light armour - except the foot scouts which are used as round out buy sometimes as are the snipers. Armies which use lots of scout cars as direct support (say SA or Rhodesian Elands) might have those in the light support above and use these slots for the selous scouts, cavalry or whatever specialist recce.

128) Basic armour car section ID - the basic recce unit, usually a section of 2-3 armoured cars, could be jeep mounted recce scouts or horsed cavalry etc. Cheap and expendable.
129) Alternate light armour recce section ID - an alternate, 50% chance to replace 128. Should still be cheap.
130) Min remaining points to buy armour recce section - nothing to do with the cost of the item, a minimum screening value before buying recce - 1000 to 2000 points, say. Stops AI wasting points on recce when low.
131) Armour recce larger lump nr 1 - A larger (or more expensive) recce unit, possibly a recce company, or say heavy armoured cars like Saladin if #128 was a couple of Ferrets.
132) Armour recce larger lump nr 2 - a 50% alternative to 131
133) Points needed to buy arm recon co - a much larger value than 130 as recce co is rarer than a scout section
134) leg recce (scouts) section ID - a cheap section of 2 or so scouts. Used as round-out, so may be the defaut leg rifle platton if desired, as scouts are now getting expensive.
135) A cheap jeep or second leg scout sect - 50% replacement to 134, usually a couple of soft jeeps and 2 scouts, could be a different leg small recce unit.

of course - 131 and 132 could be used as say a special tank task force in some armies e.g. a UK balanced combat team, or for some armies which may only have a very few rare tanks - a tank platoon here, seen only when going forwards. No particular need for these to be "recce" - just units used when advancing as opposed to delaying or defending. Except the #134 item, used as a round out when only a few buy points are left, so that one should be cheap and leg.

You may want to have an OOB where every leg rifle co pretty much has a pair of armoured cars in direct support when going forwards, but not in the defence. in that case - set 128 to point to the section of 2 or 3 Eland-90 or whatever, then make #130 low, like 200 points, and set #140 to a silly big number. Most passes through the buy loop should then give you a rifle co with associated armoured car platoon when advancing or assaulting (as well as the arty tanks etc), and none when your force is delaying/defending.

The recce unit section can therefore be a useful place to experiment with "going forwards only" type troops.


UNUSED
======
136-139 - were going to be air cavalry recce, but not used - spare. set to 0.

140) max number of recce units allowed. Use to limit the number of recce units - typically 2 to 4 here.

AT DEFENCE
----------

AT gun formations are bought in the defence - these can be normal static AT guns. Bought in the delay or defend mission.

141) AT gun plt ID (defence) - small unit of 2-3 AT guns, RCL, inf-AT or inf-ATGM. Could be SP-RCL if desired. Common buy, so nothing too expensive here.
142) AT Gun/missiles company ID - an ATG gun platoon of 6 or so guns, or a more expensive AT unit than 141 (eg inf ATGM if 141 is a RPG type section). Bought on occasion if >1000 or so buy points left.

Naturally - these can be any sort of cheap forces you want to use in the defence. Best for these to be proper weapons with decent anti tank capacity, or the human player will take advantage of the AI and overrun it with armour.

MISC
====

143) Sniper Unit ID - used in the delay, or round out buy. 
144) Naval support unit 1 - used when assaulting a beach. Could be commando co, support landing craft or whatever is useful in attacking a beach. Bought if remaining points>=2500, on every second pass through the buy loop, max of 4.
145) Naval landing support alt unit - 50% chance to replace 144.

146) flame tanks section ID - used in the assault only. Occasional buy, but expected to be reasonably cheap, so stick to a platoon oir section of 2-3 flame tanks.

If no flame tanks, you could use for more leg engineers - do not use for engineer tanks as these have thier own lines above (or conversely use to add yet more engineer tanks to some OOB ?). Could be a special assault-only infantry or armour formation (say CS 105mm howitzer tanks). About a 20% chance to buy every second pass through the buy loop. USSR might use this for KTM fitted MBT platoons perhaps?.

#144 and 145 could be used to increase the number of engineer type tanks in a beach assault as well, if desired. Probably best as plough fitted MBT?.


AI PICK DETAILS
===============

(outline)

Initial buy

buy HQ
buy compulsory mortar section (91)
buy inf-SAM/AAMG section (28) 
buy low points tank section (60/62) or full platoon (61) if points allow
buy up-front mines in defence.

LOOP
  buy mines?
  buy items from pick list 
    - infantry pl/co 
      - buy extra (leg) rifle pl/co if a city map (town level 6 or more)
      - buy extra inf-at section if a city map
      - buy forts in defence OR engineers in assault
    - armoured pl/co
    - air/anti-air
    - arty
    - extras
UNTIL (no points left or has not bought anything for a while)





DEFAULT AI PICK LIST
====================

Where no pick list is provided, or an error in processing the pick data occurs, 
the code will tend to fall back to the initialisation values for the key values.

if you just want to design a simple pick (no data fiiles) - then ALL these
formations MUST be
  a) of the expected type (stupid to put your air strike formation where the pick expects rifle platoon)
  b) available right through from the start of your OOB to the bitter end, except that if it is
     not available - it will just not be purchased.
     (key items like the basic rifle and tank sections and platoons should most definately
      be available and with troops to fill for the entire period of the nation )
      
   the snip below is from the variable declarations section,  in the same sequence as the column in the spreadsheet
   
      
  nRifleCos=1;  <<<<<<<<<<<<<<< first item on the pick list file data column, ie buy 1 coy
  LegRifleCo1=6;  default rifle coy ID is #6
  LegRifleCo2=7;  and we expect some better riflemen in formation #7 as well
  LegRifleCo2min=1600;  only buy the better riflemen if points remaining are at this level
  LegRifleCo2chance=20; and if enough points, only buy the better riflemen 20% of the time
  LegRifleCo3=0;
  LegRifleCo3min=0;
  LegRifleCo3chance=0;
  LegRiflePlt=39; // use this as the cheap rifle platoon buy, and for end of points round-off etc. 
  MechRifleCo1=4; // our mechanised (or attack leg) rifle co is #4 (regular leg will be bought then too)(is bought in defence too)
  MechRifleCo2=0;
  MechRifleCo2min=0;
  MechRifleCo2chance=0;
  MechRifleCo3=0;
  MechRifleCo3min=0;
  MechRifleCo3chance=0;
  MechRiflePlt=37; // used when points low, but not as low as leg rifle platoon
  FortsID=63;  // handy to have some forts when defending
  EngPltID=41; // and people to clear mines if we assault
  EngTnkPlt1ID=65; // see above - supplementary engineer troop buy
  EngTnkPlt2ID=0;
  EngTankMax=4; // max number of supplementary engineers bought
  TptHeloPlt=43; 
  TptHeloCo=0;
  TptHeloCoPts=2500;
  TptHeloChance=10;
  MaxTptHelo=2; 
  InfSAMID=30;
  AAPltID=33;
  SPAAASecID=18;
  SPAAAPltID=0;
  SPSAMSecID=19;
  SPSAMPltID=0;
  AreaAAAID=20; 
  InfATSecID=29;
  InfATGMSecID=0; 
  OffmapArtChance=20;
  OffmapLightBtyID=49;
  OffmapLightBnID=55;
  OffMapLtBnPoints=600;
  OffMapMedBtyID=50;
  OffMapMedBnID=56;
  OffMapMedBnPoints=1000;
  OffMapHeavyBtyID=51;
  OffMapHeavyBnID=57;
  OffMapHeavyBNPoints=1500;
  OffMapRktBtyID=47;
  OffMapRktBnID=53;
  OffMapRktBnPoints=1500;
  OffMapGunMineletBty=0;
  OffMapGunMineletPoints=0;
  OffMapMineRocketBtyID=0;
  OffMapMineRocketBtyPoints=0;
  OffMapMinesChance=0;
  OffMapNavalArtStart=0; //default pick has no navy
  NrOffMapNavalBats=0; 
  OffMapBombletBty=0;
  OffMapBombletBtyPoints=0;
  OffMapBombletBtyChance=0; 
  TankSection1ID=0;
  TankSection1minPoints=0;
  TankSection2ID=0;
  TankSection2minPoints=0;
  TankSection2Chance=0;
  TankPlatoon1ID=9;  // default OOB just uses the basic tank platoon
  TankPlatoon1minPoints=300; // if left at a low value, it will do its best to buy some tanks. Too high and it may miss. set at about the cheapest value for a current MBT and it should buy one of a platoon with its final gasp of buy points. Experiment.
  TankPlatoon2ID=0;
  TankPlatoon2minPoints=0;
  TankPlatoon2Chance=0;
  TankPlatoon3ID=0;
  TankPlatoon3minPoints=0;
  TankPlatoon3Chance=0;
  TankCompany1ID=2;
  TankCompany1minPoints=850; // quite low in relation to 2000AD tanks costs, so can result in exhauseted points early in the buy (one reason to write a proper pick list and not relu on the default buy ! :)
  TankCompany1Chance=0;
  TankCompany2ID=0;
  TankCompany2minPoints=0;
  TankCompany2Chance=0;
  TankCompany3ID=0;
  TankCompany3minPoints=0;
  TankCompany3Chance=0; 
  SPTDSection1ID=15;
  SPTDSection2ID=0;
  SPTDSection2Chance=0;
  SPTDBatteryID=0;
  SPTDBatteryminPoints=0;
  SPTDBatteryChance=0;
  InfHYATGMSectID=0;
  BargeCarrierID=150;
  BargeCarrierBigID=150; 
  MortarSectID=31;
  MortarBtyID=0;
  HyMortSecID=0;
  HYMortBtyID=0;
  SPMortSectID=81;
  SPMortPltID=0;
  SPHyMortSecID=0;
  SPHYMortPltID=0;
  TowedGunPltID=34;
  TowedGunBtyID=0;
  SPAPltID=17;
  SPAPlt1MinPoints=500;
  SPAPlt2ID=0;
  SPAPlt2Chance=0;
  SPABty1ID=0;
  SPABTYMinPts=0;
  SPABty2ID=0;
  SPABty2Chance=0; 
  FootFOTeamID=0;
  VehicleFOOID=80;
  FooChance=0; 
  StrikeElementID=46;
  AttackHeloID=45;
  WWeaselStrikeID=0;
  HeloInsteadOfFixedChance=30; 
  MGAGLSec1ID=35;
  MGAGLSec2ID=0; 
  LightTankPlt1=8;  // default pick has 2 of these to add flavour - remember can be other grunts etc.
  LightTankPlt2=16;
  LightTank3Plt=0;
  LightTank4Plt=0;
  PointsReqForLT=0;
  LightTankChance=30;
  Lighttank2PltChance=60;
  Lighttank3PltChance=0;
  Lighttank4PltChance=0;
  MaxLightTankPlts=3; 
  RecceSection1ID=21;
  RecceSection2ID=0;
  PointsForArmRecceSection=300;
  RecceCompany1ID=0;
  RecceCompany2ID=0;
  PointsForArmRecceCo=0;
  LegRecceSection=0;
  LegJeepRecceID=0;
  AirCavalryUnitID=0;
  AirCavMinPoints=0;
  AirRemainToGetAirCav=0;
  AirCavFlights=0;
  maxRecce=2; 
  ATGunPltID=32;
  ATGunBtyID=0; 
  SniperID=42; 
  NavalSupportID1=0;
  NavalSupportID2=0; 
  FlameTankID=0;   <<<<<<<<<<<<<<< last item on the pick list file data column